package org.jiuling.gaode.geocode.model;

import com.alibaba.fastjson2.annotation.JSONField;

import java.util.List;

/**
 * 逆向地理编码响应模型
 * @author 紫灵
 * @date 2024年11月15日 01时23分42秒
 */
public class ReGeoCodeResponseModel {

    /** 结果状态值 */
    private boolean status;
    /** 状态说明 */
    private String info;
    /** 数据 */
    @JSONField(name = "regeocode")
    private ReGeoCodeModel reGeoCode;
    /** 状态码 */
    @JSONField(name = "infocode")
    private int infoCode;

    public boolean isStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status.equals("1");
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public ReGeoCodeModel getReGeoCode() {
        return reGeoCode;
    }

    public void setReGeoCode(ReGeoCodeModel reGeoCode) {
        this.reGeoCode = reGeoCode;
    }

    public int getInfoCode() {
        return infoCode;
    }

    public void setInfoCode(int infoCode) {
        this.infoCode = infoCode;
    }

    /**
     * 逆向地理编码数据
     */
    public static class ReGeoCodeModel{
        /** 格式化地址 */
        @JSONField(name = "formatted_address")
        private String formattedAddress;
        /** 地址元素 */
        private AddressComponentModel addressComponent;
        /** 道路信息列表 */
        @JSONField(name = "roads")
        private List<RoadModel> roadList;
        /** 道路交叉口列表 */
        @JSONField(name = "roadinters")
        private List<RoadinterModel> roadinterList;
        /** poi 信息 */
        @JSONField(name = "pois")
        private List<PoiModel> poiList;
        /** aoi 信息 */
        @JSONField(name = "aois")
        private List<AoiModel> aoisList;

        public String getFormattedAddress() {
            return formattedAddress;
        }

        public void setFormattedAddress(String formattedAddress) {
            this.formattedAddress = formattedAddress;
        }

        public AddressComponentModel getAddressComponent() {
            return addressComponent;
        }

        public void setAddressComponent(AddressComponentModel addressComponent) {
            this.addressComponent = addressComponent;
        }

        public List<RoadModel> getRoadList() {
            return roadList;
        }

        public void setRoadList(List<RoadModel> roadList) {
            this.roadList = roadList;
        }

        public List<RoadinterModel> getRoadinterList() {
            return roadinterList;
        }

        public void setRoadinterList(List<RoadinterModel> roadinterList) {
            this.roadinterList = roadinterList;
        }

        public List<PoiModel> getPoiList() {
            return poiList;
        }

        public void setPoiList(List<PoiModel> poiList) {
            this.poiList = poiList;
        }

        public List<AoiModel> getAoisList() {
            return aoisList;
        }

        public void setAoisList(List<AoiModel> aoisList) {
            this.aoisList = aoisList;
        }

        /**
         * 地址元素模型
         */
        public static class AddressComponentModel{

            /** 坐标点所在城市名称 */
            private String city;
            /** 坐标点所在省名称 */
            private String province;
            /** 行政区编码 */
            private Long adcode;
            /** 坐标点所在区 */
            private String district;
            /** 乡镇街道编码 */
            private Long towncode;
            /** 坐标点所在国家名称 */
            private String country;
            /** 坐标点所在乡镇/街道（此街道为社区街道，不是道路信息） */
            private String township;
            /** 城市编码 */
            private Long citycode;
            /** 经纬度所属商圈列表 */
            @JSONField(name = "businessAreas")
            private List<BusinessAreaModel> businessAreaList;
            /** 楼信息列表 */
            private BuildingModel building;
            /** 社区信息列表 */
            private NeighborhoodModel neighborhood;
            /** 门牌信息列表 */
            private StreetNumberModel streetNumber;

            public String getCity() {
                return city;
            }

            public void setCity(String city) {
                this.city = city;
            }

            public String getProvince() {
                return province;
            }

            public void setProvince(String province) {
                this.province = province;
            }

            public Long getAdcode() {
                return adcode;
            }

            public void setAdcode(Long adcode) {
                this.adcode = adcode;
            }

            public String getDistrict() {
                return district;
            }

            public void setDistrict(String district) {
                this.district = district;
            }

            public Long getTowncode() {
                return towncode;
            }

            public void setTowncode(Long towncode) {
                this.towncode = towncode;
            }

            public String getCountry() {
                return country;
            }

            public void setCountry(String country) {
                this.country = country;
            }

            public String getTownship() {
                return township;
            }

            public void setTownship(String township) {
                this.township = township;
            }

            public Long getCitycode() {
                return citycode;
            }

            public void setCitycode(Long citycode) {
                this.citycode = citycode;
            }

//            public List<BusinessAreaModel> getBusinessAreaList() {
//                return businessAreaList;
//            }
//
//            public void setBusinessAreaList(List<BusinessAreaModel> businessAreaList) {
//                this.businessAreaList = businessAreaList;
//            }
//
//            public BuildingModel getBuilding() {
//                return building;
//            }
//
//            public void setBuilding(BuildingModel building) {
//                this.building = building;
//            }
//
//            public NeighborhoodModel getNeighborhood() {
//                return neighborhood;
//            }
//
//            public void setNeighborhood(NeighborhoodModel neighborhood) {
//                this.neighborhood = neighborhood;
//            }

            public StreetNumberModel getStreetNumber() {
                return streetNumber;
            }

            public void setStreetNumber(StreetNumberModel streetNumber) {
                this.streetNumber = streetNumber;
            }

            /** 经纬度所属商圈列表 */
            public static class BusinessAreaModel{

                /** 商圈所在区域的 adcode */
                private String id;
                /** 商圈名称 */
                private String name;
                /** 商圈中心点经纬度 */
                private String location;

                public String getId() {
                    return id;
                }

                public void setId(String id) {
                    this.id = id;
                }

                public String getName() {
                    return name;
                }

                public void setName(String name) {
                    this.name = name;
                }

                public String getLocation() {
                    return location;
                }

                public void setLocation(String location) {
                    this.location = location;
                }
            }

            /** 楼信息列表 */
            public static class BuildingModel{

                /** 建筑名称 */
                private List<String> name;
                /** 类型 */
                private List<String> type;

                public List<String> getName() {
                    return name;
                }

                public void setName(List<String> name) {
                    this.name = name;
                }

                public List<String> getType() {
                    return type;
                }

                public void setType(List<String> type) {
                    this.type = type;
                }
            }

            /** 社区信息列表 */
            public static class NeighborhoodModel{

                /** 社区名称 */
                private List<String> name;
                /** POI 类型 */
                private List<String> type;

                public List<String> getName() {
                    return name;
                }

                public void setName(List<String> name) {
                    this.name = name;
                }

                public List<String> getType() {
                    return type;
                }

                public void setType(List<String> type) {
                    this.type = type;
                }
            }

            /** 门牌信息列表 */
            public static class StreetNumberModel{

                /** 街道名称 */
                private String street;
                /** 门牌号 */
                private String number;
                /** 坐标点 */
                private String location;
                /** 方向 */
                private String direction;
                /** 门牌地址到请求坐标的距离 单位：米 */
                private Double distance;

                public String getStreet() {
                    return street;
                }

                public void setStreet(String street) {
                    this.street = street;
                }

                public String getNumber() {
                    return number;
                }

                public void setNumber(String number) {
                    this.number = number;
                }

                public String getLocation() {
                    return location;
                }

                public void setLocation(String location) {
                    this.location = location;
                }

                public String getDirection() {
                    return direction;
                }

                public void setDirection(String direction) {
                    this.direction = direction;
                }

                public Double getDistance() {
                    return distance;
                }

                public void setDistance(Double distance) {
                    this.distance = distance;
                }
            }

        }

        /**
         * 道路信息模型
         */
        public static class RoadModel{

            /** 道路 id */
            private String id;
            /** 坐标点 */
            private String location;
            /** 方位 */
            private String direction;
            /** 道路名称 */
            private String name;
            /** 道路到请求坐标的距离 */
            private String distance;

            public String getId() {
                return id;
            }

            public void setId(String id) {
                this.id = id;
            }

            public String getLocation() {
                return location;
            }

            public void setLocation(String location) {
                this.location = location;
            }

            public String getDirection() {
                return direction;
            }

            public void setDirection(String direction) {
                this.direction = direction;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public String getDistance() {
                return distance;
            }

            public void setDistance(String distance) {
                this.distance = distance;
            }
        }

        /**
         * 道路交叉口
         */
        public static class RoadinterModel{
            /** 第二条道路名称 */
            @JSONField(name = "second_name")
            private String secondName;
            /** 第一条道路 id */
            @JSONField(name = "first_id")
            private String firstId;
            /** 第二条道路 id */
            @JSONField(name = "second_id")
            private String secondId;
            /** 路口经纬度 */
            @JSONField(name = "location")
            private String location;
            /** 交叉路口到请求坐标的距离 */
            @JSONField(name = "distance")
            private String distance;
            /** 第一条道路名称 */
            @JSONField(name = "first_name")
            private String firstName;
            /** 方位 */
            @JSONField(name = "direction")
            private String direction;

            public String getSecondName() {
                return secondName;
            }

            public void setSecondName(String secondName) {
                this.secondName = secondName;
            }

            public String getFirstId() {
                return firstId;
            }

            public void setFirstId(String firstId) {
                this.firstId = firstId;
            }

            public String getSecondId() {
                return secondId;
            }

            public void setSecondId(String secondId) {
                this.secondId = secondId;
            }

            public String getLocation() {
                return location;
            }

            public void setLocation(String location) {
                this.location = location;
            }

            public String getDistance() {
                return distance;
            }

            public void setDistance(String distance) {
                this.distance = distance;
            }

            public String getFirstName() {
                return firstName;
            }

            public void setFirstName(String firstName) {
                this.firstName = firstName;
            }

            public String getDirection() {
                return direction;
            }

            public void setDirection(String direction) {
                this.direction = direction;
            }
        }

        /**
         * poi 信息
         */
        public static class PoiModel{
            /** poi 的 id */
            private String id;
            /** 方向 */
            private String direction;
            /** poi 地址信息 */
            private String address;
            /** */
            private String poiweight;
            /** poi 点名称 */
            private String name;
            /** 坐标点 */
            private String location;
            /** 该 POI 的中心点到请求坐标的距离 */
            private String distance;
            /** poi 类型 */
            private String type;
            /** 电话 */
            private String tel;
            /** poi 所在商圈名称 */
            private String businessarea;

            public String getId() {
                return id;
            }

            public void setId(String id) {
                this.id = id;
            }

            public String getDirection() {
                return direction;
            }

            public void setDirection(String direction) {
                this.direction = direction;
            }

            public String getAddress() {
                return address;
            }

            public void setAddress(String address) {
                this.address = address;
            }

            public String getPoiweight() {
                return poiweight;
            }

            public void setPoiweight(String poiweight) {
                this.poiweight = poiweight;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public String getLocation() {
                return location;
            }

            public void setLocation(String location) {
                this.location = location;
            }

            public String getDistance() {
                return distance;
            }

            public void setDistance(String distance) {
                this.distance = distance;
            }

            public String getType() {
                return type;
            }

            public void setType(String type) {
                this.type = type;
            }

            public String getBusinessarea() {
                return businessarea;
            }

            public void setBusinessarea(String businessarea) {
                this.businessarea = businessarea;
            }

            public String getTel() {
                return tel;
            }

            public void setTel(String tel) {
                this.tel = tel;
            }
        }

        /**
         * aoi 信息
         */
        public static class AoiModel{
            /** 所属 aoi 点面积 */
            private String area;
            /** 所属 aoi 类型 */
            private String type;
            /** 所属 aoi 的 id */
            private String id;
            /** 所属 aoi 中心点坐标 */
            private String location;
            /** 所属 aoi 所在区域编码 */
            private String adcode;
            /** 所属 aoi 名称 */
            private String name;
            /** 输入经纬度是否在 aoi 面之中 */
            private String distance;

            public String getArea() {
                return area;
            }

            public void setArea(String area) {
                this.area = area;
            }

            public String getType() {
                return type;
            }

            public void setType(String type) {
                this.type = type;
            }

            public String getId() {
                return id;
            }

            public void setId(String id) {
                this.id = id;
            }

            public String getLocation() {
                return location;
            }

            public void setLocation(String location) {
                this.location = location;
            }

            public String getAdcode() {
                return adcode;
            }

            public void setAdcode(String adcode) {
                this.adcode = adcode;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public String getDistance() {
                return distance;
            }

            public void setDistance(String distance) {
                this.distance = distance;
            }
        }
    }
}
